package com.dingpeikeji.quickdeer.core.modules.sys.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;

/**
 * 广告管理Entity
 * @author lh
 * @version 2016-11-11
 */
public class SysAds extends DataEntity<SysAds> {
	
	private static final long serialVersionUID = 1L;
	private Integer aid;		// 主键
	private String atitle;		// 标题
	private String pageurl;		// 链接地址
	private String linkurl;		// 链接地址
	private String adimg;		// 图片名称
	private Integer numsort;	// 排序
	private Integer isshow;		// 是否显示
	private Integer position;	// 显示位置
	
	public SysAds() {
		super();
	}

	public SysAds(String id){
		super(id);
	}

	/*@NotNull(message="主键不能为空")*/
	public Integer getAid() {
		return aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}
	
	@Length(min=1, max=100, message="标题长度必须介于 1 和 100 之间")
	public String getAtitle() {
		return atitle;
	}

	public void setAtitle(String atitle) {
		this.atitle = atitle;
	}
	
	@Length(min=1, max=200, message="链接地址长度必须介于 1 和 200 之间")
	public String getPageurl() {
		return pageurl;
	}

	public void setPageurl(String pageurl) {
		this.pageurl = pageurl;
	}
	
	@Length(min=0, max=250, message="图片名称长度必须介于 0 和 250 之间")
	public String getAdimg() {
		return adimg;
	}

	public void setAdimg(String adimg) {
		this.adimg = adimg;
	}
	
	@NotNull(message="排序是必填项")
	public Integer getNumsort() {
		return numsort;
	}

	public void setNumsort(Integer numsort) {
		this.numsort = numsort;
	}
	
	@NotNull(message="是否显示不能为空")
	public Integer getIsshow() {
		return isshow;
	}

	public void setIsshow(Integer isshow) {
		this.isshow = isshow;
	}
	
	public Integer getPosition() {
		return position;
	}

	public void setPosition(Integer position) {
		this.position = position;
	}

	@Length(min=0, max=200, message="链接长度必须介于 0 和 200 之间")
	public String getLinkurl() {
		return linkurl;
	}

	public void setLinkurl(String linkurl) {
		this.linkurl = linkurl;
	}
	
}